package com.turing.common.handler;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.web.servlet.handler.HandlerInterceptorAdapter;

import com.turing.common.entity.Context;

/**
 * @Description TODO
 * @Author lcy
 * @Date 2021/5/22 20:50
 */
public class HandlerInterceptor extends HandlerInterceptorAdapter {

    @Override
    public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex) throws Exception {
        //删除线程变量
        Context.removeTokenContext();
        super.afterCompletion(request, response, handler, ex);
    }

}
